import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '产品类型id',
    align:"center",
    dataIndex: 'categoryId'
   },
   {
    title: '名称',
    align:"center",
    dataIndex: 'name'
   },
   {
    title: '制造商',
    align:"center",
    dataIndex: 'mfrs'
   },
   {
    title: '型号',
    align:"center",
    dataIndex: 'model'
   },
   {
    title: '规格',
    align:"center",
    dataIndex: 'standard'
   },
   {
    title: '颜色',
    align:"center",
    dataIndex: 'color'
   },
   {
    title: '单位-单个',
    align:"center",
    dataIndex: 'unit'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
   {
    title: '图片名称',
    align:"center",
    dataIndex: 'imgName'
   },
   {
    title: '计量单位Id',
    align:"center",
    dataIndex: 'unitId'
   },
   {
    title: '保质期天数',
    align:"center",
    dataIndex: 'expiryNum'
   },
   {
    title: '基础重量(kg)',
    align:"center",
    dataIndex: 'weight'
   },
   {
    title: '启用 0-禁用  1-启用',
    align:"center",
    dataIndex: 'enabled'
   },
   {
    title: '自定义1',
    align:"center",
    dataIndex: 'otherField1'
   },
   {
    title: '自定义2',
    align:"center",
    dataIndex: 'otherField2'
   },
   {
    title: '自定义3',
    align:"center",
    dataIndex: 'otherField3'
   },
   {
    title: '是否开启序列号，0否，1是',
    align:"center",
    dataIndex: 'enableSerialNumber'
   },
   {
    title: '是否开启批号，0否，1是',
    align:"center",
    dataIndex: 'enableBatchNumber'
   },
   {
    title: '仓位货架',
    align:"center",
    dataIndex: 'position'
   },
   {
    title: '租户id',
    align:"center",
    dataIndex: 'tenantId'
   },
   {
    title: '删除标记，0未删除，1删除',
    align:"center",
    dataIndex: 'deleteFlag'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '产品类型id',
    field: 'categoryId',
    component: 'InputNumber',
  },
  {
    label: '名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '制造商',
    field: 'mfrs',
    component: 'Input',
  },
  {
    label: '型号',
    field: 'model',
    component: 'Input',
  },
  {
    label: '规格',
    field: 'standard',
    component: 'Input',
  },
  {
    label: '颜色',
    field: 'color',
    component: 'Input',
  },
  {
    label: '单位-单个',
    field: 'unit',
    component: 'Input',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'Input',
  },
  {
    label: '图片名称',
    field: 'imgName',
    component: 'Input',
  },
  {
    label: '计量单位Id',
    field: 'unitId',
    component: 'InputNumber',
  },
  {
    label: '保质期天数',
    field: 'expiryNum',
    component: 'InputNumber',
  },
  {
    label: '基础重量(kg)',
    field: 'weight',
    component: 'InputNumber',
  },
  {
    label: '启用 0-禁用  1-启用',
    field: 'enabled',
    component: 'Input',
  },
  {
    label: '自定义1',
    field: 'otherField1',
    component: 'Input',
  },
  {
    label: '自定义2',
    field: 'otherField2',
    component: 'Input',
  },
  {
    label: '自定义3',
    field: 'otherField3',
    component: 'Input',
  },
  {
    label: '是否开启序列号，0否，1是',
    field: 'enableSerialNumber',
    component: 'Input',
  },
  {
    label: '是否开启批号，0否，1是',
    field: 'enableBatchNumber',
    component: 'Input',
  },
  {
    label: '仓位货架',
    field: 'position',
    component: 'Input',
  },
  {
    label: '租户id',
    field: 'tenantId',
    component: 'InputNumber',
  },
  {
    label: '删除标记，0未删除，1删除',
    field: 'deleteFlag',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];



/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}